import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}
/**
 * 
 * @param {获取用户信息} data 
 * @returns 
 */
export function userInfo() {
  return request({
    url: '/sys/profile',
    method: 'post'
  })
}

// 获取用户基本信息
export function getUsername(userId) {
  return request({
    url: `/sys/user/${userId}`
  })
}